# Buffer makefile

SRCS = $(wildcard *.cpp)
OBJS = $(SRCS:.cpp=.o)
INCS = $(wildcard *.h)

TARGET = libBuffer.so
# TARGET = buffer

CXXFLAGS = -O2 -Wall -fPIC -c
LDFLAGS  = -shared -Wl,-soname,$(TARGET)
LIBS     =

# CXXFLAGS = -O2 -Wall -c
# LDFLAGS  =

%.o: %.cpp
	$(CXX) $(CXXFLAGS) $< -o $@

$(TARGET): $(OBJS)
	$(CXX) $(LDFLAGS) $(OBJS) -o $@ $(LIBS)

debug: CXX += -DDEBUG -g
debug: all

release: all

all: $(TARGET)

.PHONY: clean
clean:
	rm -f $(OBJS) $(TARGET)
